Imports System
Imports System.Data


Namespace ModuleMasters.DNN.Modules.NCAAPoolBracket

    Public Class NCAAController

#Region "Public Methods"

        Public Function GetUserPicks(ByVal ModuleId As Integer, ByVal UserId As Integer) As ArrayList
            Return CBO.FillCollection(DataProvider.Instance().GetUserPicks(ModuleId, UserId), GetType(GameInfo))
        End Function

        Public Function GetResults(ByVal ModuleId As Integer) As ArrayList
            Return CBO.FillCollection(DataProvider.Instance().GetResults(ModuleId), GetType(GameInfo))
        End Function

        Public Sub InsertUserPrediction(ByVal PortalId As Integer, ByVal ModuleId As Integer, ByVal UserId As Integer, ByVal GameId As String, ByVal TeamName As String, ByVal GameScore As Integer, ByVal TeamAScore As Integer, ByVal TeamBScore As Integer)
            DataProvider.Instance().InsertUserPrediction(PortalId, ModuleId, UserId, GameId, TeamName, GameScore, TeamAScore, TeamBScore)
        End Sub

        Public Sub InsertResults(ByVal PortalId As Integer, ByVal ModuleId As Integer, ByVal GameId As String, ByVal TeamName As String, ByVal GameScore As Integer, ByVal TeamAScore As Integer, ByVal TeamBScore As Integer)
            DataProvider.Instance().InsertResults(PortalId, ModuleId, GameId, TeamName, GameScore, TeamAScore, TeamBScore)
        End Sub

        Public Sub DeleteUserPrediction(ByVal ModuleId As Integer, ByVal UserId As Integer)
            DataProvider.Instance().DeleteUserPrediction(ModuleId, UserId)
        End Sub

        Public Function GetRoundPoints(ByVal PortalId As Integer, ByVal ModuleId As Integer) As ArrayList
            Return CBO.FillCollection(DataProvider.Instance().GetRoundPoints(PortalId, ModuleId), GetType(RoundInfo))
        End Function

        Public Sub DeleteRoundPoints(ByVal PortalId As Integer, ByVal ModuleId As Integer)
            DataProvider.Instance().DeleteRoundPoints(PortalId, ModuleId)
        End Sub

        Public Sub InsertRoundPoints(ByVal PortalId As Integer, ByVal ModuleId As Integer, ByVal RoundId As Integer, ByVal RoundPoints As Integer, ByVal RoundGames As Integer)
            DataProvider.Instance().InsertRoundPoints(PortalId, ModuleId, RoundId, RoundPoints, RoundGames)
        End Sub

        Public Sub ClearResults(ByVal PortalId As Integer, ByVal ModuleId As Integer)
            DataProvider.Instance().ClearResults(PortalId, ModuleId)
        End Sub

#End Region

    End Class

End Namespace
